Skip to content

fix: enable terminal session persistence by default#770

Merged
ZacharyZcR merged 1 commit into
Termix-SSH:dev-2.3.0from
ZacharyZcR:fix/default-session-persistence
May 17, 2026
Merged

fix: enable terminal session persistence by default#770
ZacharyZcR merged 1 commit into
Termix-SSH:dev-2.3.0from
ZacharyZcR:fix/default-session-persistence

Conversation

@ZacharyZcR
Copy link
Copy Markdown
Member

@ZacharyZcR ZacharyZcR commented May 13, 2026

Summary

Terminal session persistence (the ability to reconnect to a running SSH session after a page refresh or network interruption) was opt-in and disabled by default. Most users expect sessions to survive brief disconnections (laptop sleep, page refresh) without losing their running commands.

Changes

Changed the default from opt-in (=== "true") to opt-out (!== "false") across all 4 files that check the enableTerminalSessionPersistence localStorage flag:

  • Terminal.tsx — session attach on connect, session save on disconnect
  • TabContext.tsx — tab state save/restore
  • UserProfile.tsx — settings toggle initial state
  • UserProfilePanel.tsx — settings toggle initial state

Users who explicitly disabled persistence (localStorage.enableTerminalSessionPersistence = "false") will still have it disabled. New users get persistence enabled automatically.

Limitations

This fixes same-device session recovery. Cross-device session sharing (seeing sessions from device A on device B) requires additional work — the session ID is stored in localStorage which is browser-local. A future enhancement could query the backend's detached session list on connect.

Related

Closes Termix-SSH/Support#591

@ZacharyZcR ZacharyZcR closed this May 17, 2026
@ZacharyZcR ZacharyZcR deleted the fix/default-session-persistence branch May 17, 2026 17:51
@ZacharyZcR ZacharyZcR restored the fix/default-session-persistence branch May 17, 2026 20:16
@ZacharyZcR ZacharyZcR reopened this May 17, 2026
@ZacharyZcR ZacharyZcR force-pushed the fix/default-session-persistence branch from 9b95e25 to dd0bfb5 Compare May 17, 2026 20:40
@ZacharyZcR ZacharyZcR merged commit 125ba1e into Termix-SSH:dev-2.3.0 May 17, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant